const router = require('koa-router')();
const bookController = require('./../controllers/books.controller');

router.prefix('/books');

// 添加二手书
router.put('/info', bookController.addBook);
// 获取二手书信息
router.get('/info', bookController.getBookInfo);
// 二手书信息修改
router.post('/info', bookController.modifyBookInfo);

// 添加二手书评论
router.post('/evaluate', bookController.addEvaluate);
// 查看二手书评论
router.get('/evaluate', bookController.getEvaluate);

//二手书搜索
router.get('/search', bookController.searchBooks);
// 二手书推荐
router.get('/recommend', bookController.recommend);
module.exports = router